There are video cameras which offer both day and night functionality. Such cameras are designed to be used in outdoor installations or in indoor environments with poor lighting. When in day mode, i.e., when the light in the scene is above a certain level, the camera delivers colour images. As light diminishes below the certain level, the camera automatically switches to night mode to make use of near infrared (IR) light to deliver high-quality black and white images.
Near-infrared light, which spans from 700 nm up to about 1000 nm, is beyond what the human eye can see, but most camera sensors can detect it and make use of it. When in day mode, the camera uses an IR-cut filter which filters out IR light such that it does not distort the colours of the images as the human eye sees them. When the camera is in night mode, the IR-cut filter is removed, thereby allowing the light sensitivity of the camera to reach down to 0.001 lux or lower.
US patent application with publication number US 2015/138368 A1 relates to an imaging apparatus having an IR-cut filter which may be inserted and removed from an optical path of an imaging optical system depending on a measured brightness value.
When the IR-cut filter changes state, i.e., is turned on or off, there will be a sudden change in the video captured by the camera, partially due to the introduction or removal of colours, and partially since objects look different in the visible spectrum compared to the IR spectrum. This change will not only affect the appearance of the video, but it will also have impact on the efficiency and quality of the encoding of the video.
Known video coding techniques, such as MPEG-4 and 11.264, use interframe prediction to reduce video data between a series of frames. This involves techniques such as difference coding, where one frame is compared with a reference frame and only pixels that have changed with respect to the reference frame are coded, and block-based motion compensation, where a new frame can be predicted block by block by looking for a matching block in a reference frame.
With interframe prediction, each frame is classified as a certain type of frame, such as an intra-frame (sometimes referred to as an I-frame, e.g., in 11.264) or an inter-frame (sometimes referred to as a P-frame or B-frame, e.g., in 11.264). An intra-frame is a self-contained frame that can be independently decoded without any reference to other images. In particular, when encoding intra-frames, the luminance and chrominance channels are encoded by exploiting the spatial redundancy of the pixels in a given channel of a single frame via prediction, transform, and entropy coding. This is in contrast to an inter-frame which makes references to parts of an earlier intra-frame and/or inter-frame(s) to code the frame. When encoding inter-frames, temporal redundancy between separate frames is exploited, and the encoding relies on a motion-compensation prediction technique that predicts parts of a frame from one or more previous frames by encoding the motion in pixels from one frame to another for selected blocks of pixels.
The first frame of the video after the IR-cut filter has changed state will be very different from the preceding frames. Consequently, if the first frame after the IR-cut filter has changed state is encoded with reference to the preceding frames, i.e., is encoded as an inter-frame, the resulting encoded frame will be very large. Also, it will constitute a poor reference image that will linger until the next intra-frame is generated, thereby affecting the efficiency and quality of the encoded video until the next intra-frame is generated. There is thus room for improvements.
European patent application with publication number EP 2727330 A1 relates to adjusting imaging parameters of a video camera, such as exposure and color balance, depending on encoding properties of a video encoder coupled to the video camera. The encoding properties may include an indication of which image in a video sequence is to be compressed into the next intra-coded image.